<?php

error_reporting(~E_WARNING);

$hostName = 'localhost';
$userName = 'root';
$password = '';

mysql_connect($hostName,$userName,$password) or die(mysql_error()." <br>Unable to connnect MYSQL");

mysql_select_db('b19')or die(mysql_error()." <br>Unable to Select DATABASE");

 $selectQuery = "SELECT * FROM `practice`";

echo $selectQuery,"<br>";

$result = mysql_query($selectQuery)or die(mysql_error()." <br>Unable to select DATA");


// How to know number of rows selected
echo "<br> Rows SELECTED :".mysql_num_rows($result);

echo "<pre>";

while($ans = mysql_fetch_row($result)) {

  print_r($ans);
  //echo "<br>Name is  :".$ans['name'], "<br>";

}
